/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file. */

/* Small icons for file types, used in lists and menus. */
[file-type-icon] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_generic.png) 1x,
      url(../images/filetype/2x/filetype_generic.png) 2x);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
}

[file-type-icon='archive'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_archive.png) 1x,
      url(../images/filetype/2x/filetype_archive.png) 2x);
}

[file-type-icon='audio'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_audio.png) 1x,
      url(../images/filetype/2x/filetype_audio.png) 2x);
}

[file-type-icon='excel'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_excel.png) 1x,
      url(../images/filetype/2x/filetype_excel.png) 2x);
}

[file-type-icon='folder'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_folder.png) 1x,
      url(../images/filetype/2x/filetype_folder.png) 2x);
}

.shared[file-type-icon='folder'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_folder_shared.png) 1x,
      url(../images/filetype/2x/filetype_folder_shared.png) 2x);
}

tree .tree-item[selected] > .tree-row > [file-type-icon='folder'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_folder_active.png) 1x,
      url(../images/filetype/2x/filetype_folder_active.png) 2x);
}

tree .tree-item[selected] > .tree-row > .shared[file-type-icon='folder'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_folder_shared_active.png) 1x,
      url(../images/filetype/2x/filetype_folder_shared_active.png) 2x);
}

/* TODO(fukino): Check if 'form' is in use, and remove this if possible. */
[file-type-icon='form'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_form.png) 1x,
      url(../images/filetype/2x/filetype_form.png) 2x);
}

[file-type-icon='gdoc'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_gdoc.png) 1x,
      url(../images/filetype/2x/filetype_gdoc.png) 2x);
}

[file-type-icon='gdraw'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_gdraw.png) 1x,
      url(../images/filetype/2x/filetype_gdraw.png) 2x);
}

[file-type-icon='glink'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_generic.png) 1x,
      url(../images/filetype/2x/filetype_generic.png) 2x);
}

[file-type-icon='gsheet'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_gsheet.png) 1x,
      url(../images/filetype/2x/filetype_gsheet.png) 2x);
}

[file-type-icon='gslides'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_gslides.png) 1x,
      url(../images/filetype/2x/filetype_gslides.png) 2x);
}

[file-type-icon='gtable'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_gtable.png) 1x,
      url(../images/filetype/2x/filetype_gtable.png) 2x);
}

[file-type-icon='gform'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_form.png) 1x,
      url(../images/filetype/2x/filetype_form.png) 2x);
}

[file-type-icon='gmap'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_map.png) 1x,
      url(../images/filetype/2x/filetype_map.png) 2x);
}

[file-type-icon='image'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_image.png) 1x,
      url(../images/filetype/2x/filetype_image.png) 2x);
}

[file-type-icon='pdf'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_pdf.png) 1x,
      url(../images/filetype/2x/filetype_pdf.png) 2x);
}

[file-type-icon='ppt'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_ppt.png) 1x,
      url(../images/filetype/2x/filetype_ppt.png) 2x);
}

[file-type-icon='script'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_script.png) 1x,
      url(../images/filetype/2x/filetype_script.png) 2x);
}

[file-type-icon='sites'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_sites.png) 1x,
      url(../images/filetype/2x/filetype_sites.png) 2x);
}

[file-type-icon='video'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_video.png) 1x,
      url(../images/filetype/2x/filetype_video.png) 2x);
}

[file-type-icon='word'] {
  background-image: -webkit-image-set(
      url(../images/filetype/filetype_word.png) 1x,
      url(../images/filetype/2x/filetype_word.png) 2x);
}

/* Large generic thumbnails, used when a file does not have a thumbnail. */
[generic-thumbnail] {
  background-image: -webkit-image-set(
      url(../images/files/ui/filetype_placeholder_generic.png) 1x,
      url(../images/files/ui/2x/filetype_placeholder_generic.png) 2x);
  background-position: center 50px;
  background-repeat: no-repeat;
}

[generic-thumbnail='audio'] {
  background-image: -webkit-image-set(
      url(../images/files/ui/filetype_placeholder_audio.png) 1x,
      url(../images/files/ui/2x/filetype_placeholder_audio.png) 2x);
}

[generic-thumbnail='image'] {
  background-image: -webkit-image-set(
      url(../images/files/ui/filetype_placeholder_image.png) 1x,
      url(../images/files/ui/2x/filetype_placeholder_image.png) 2x);
}

[generic-thumbnail='video'] {
  background-image: -webkit-image-set(
      url(../images/files/ui/filetype_placeholder_video.png) 1x,
      url(../images/files/ui/2x/filetype_placeholder_video.png) 2x);
}

/* Icons for volume types. */

[volume-type-icon='archive'] {
  background-image: -webkit-image-set(
      url(../images/volumes/archive.png) 1x,
      url(../images/volumes/2x/archive.png) 2x);
}

.tree-row[selected] [volume-type-icon='archive'] {
  background-image: -webkit-image-set(
      url(../images/volumes/archive_active.png) 1x,
      url(../images/volumes/2x/archive_active.png) 2x);
}

[volume-type-icon='downloads'] {
  background-image: -webkit-image-set(
      url(../images/volumes/downloads.png) 1x,
      url(../images/volumes/2x/downloads.png) 2x);
}

.tree-row[selected] [volume-type-icon='downloads'] {
  background-image: -webkit-image-set(
      url(../images/volumes/downloads_active.png) 1x,
      url(../images/volumes/2x/downloads_active.png) 2x);
}

[volume-type-icon='drive'] {
  background-image: -webkit-image-set(
      url(../images/volumes/drive.png) 1x,
      url(../images/volumes/2x/drive.png) 2x);
}

.tree-row[selected] [volume-type-icon='drive'] {
  background-image: -webkit-image-set(
      url(../images/volumes/drive_active.png) 1x,
      url(../images/volumes/2x/drive_active.png) 2x);
}

.drive-volume > .tree-row > [volume-type-icon='drive'] {
  background-image: -webkit-image-set(
      url(../images/volumes/service_drive.png) 1x,
      url(../images/volumes/2x/service_drive.png) 2x);
}

.drive-volume > .tree-row[selected] > [volume-type-icon='drive'] {
  background-image: -webkit-image-set(
      url(../images/volumes/service_drive_active.png) 1x,
      url(../images/volumes/2x/service_drive_active.png) 2x);
}

[volume-type-icon='drive_offline'] {
  background-image: -webkit-image-set(
      url(../images/volumes/offline.png) 1x,
      url(../images/volumes/2x/offline.png) 2x);
}

.tree-row[selected] [volume-type-icon='drive_offline'] {
  background-image: -webkit-image-set(
      url(../images/volumes/offline_active.png) 1x,
      url(../images/volumes/2x/offline_active.png) 2x);
}

[volume-type-icon='drive_shared_with_me'] {
  background-image: -webkit-image-set(
      url(../images/volumes/shared.png) 1x,
      url(../images/volumes/2x/shared.png) 2x);
}

.tree-row[selected] [volume-type-icon='drive_shared_with_me'] {
  background-image: -webkit-image-set(
      url(../images/volumes/shared_active.png) 1x,
      url(../images/volumes/2x/shared_active.png) 2x);
}

[volume-type-icon='drive_recent'] {
  background-image: -webkit-image-set(
      url(../images/volumes/recent.png) 1x,
      url(../images/volumes/2x/recent.png) 2x);
}

.tree-row[selected] [volume-type-icon='drive_recent'] {
  background-image: -webkit-image-set(
      url(../images/volumes/recent_active.png) 1x,
      url(../images/volumes/2x/recent_active.png) 2x);
}

[volume-type-icon='removable'] {
  background-image: -webkit-image-set(
      url(../images/volumes/usb.png) 1x,
      url(../images/volumes/2x/usb.png) 2x);
}

.tree-row[selected] [volume-type-icon='removable'] {
  background-image: -webkit-image-set(
      url(../images/volumes/usb_active.png) 1x,
      url(../images/volumes/2x/usb_active.png) 2x);
}

[volume-type-icon='removable'][volume-subtype='sd'] {
  background-image: -webkit-image-set(
      url(../images/volumes/sd.png) 1x,
      url(../images/volumes/2x/sd.png) 2x);
}

.tree-row[selected] [volume-type-icon='removable'][volume-subtype='sd'] {
  background-image: -webkit-image-set(
      url(../images/volumes/sd_active.png) 1x,
      url(../images/volumes/2x/sd_active.png) 2x);
}

[volume-type-icon='removable'][volume-subtype='optical'] {
  background-image: -webkit-image-set(
      url(../images/volumes/cd.png) 1x,
      url(../images/volumes/2x/cd.png) 2x);
}

.tree-row[selected] [volume-type-icon='removable'][volume-subtype='optical'] {
  background-image: -webkit-image-set(
      url(../images/volumes/cd_active.png) 1x,
      url(../images/volumes/2x/cd_active.png) 2x);
}

[volume-type-icon='mtp'] {
  background-image: -webkit-image-set(
      url(../images/volumes/phone.png) 1x,
      url(../images/volumes/2x/phone.png) 2x);
}

.tree-row[selected] [volume-type-icon='mtp'] {
  background-image: -webkit-image-set(
      url(../images/volumes/phone_active.png) 1x,
      url(../images/volumes/2x/phone_active.png) 2x);
}

[volume-type-icon='removable'][volume-subtype='unknown'] {
  background-image: -webkit-image-set(
      url(../images/volumes/hard_drive.png) 1x,
      url(../images/volumes/2x/hard_drive.png) 2x);
}

.tree-row[selected] [volume-type-icon='removable'][volume-subtype='unknown'] {
  background-image: -webkit-image-set(
      url(../images/volumes/hard_drive_active.png) 1x,
      url(../images/volumes/2x/hard_drive_active.png) 2x);
}

.tree-row:not([selected]) [volume-type-icon='provided'],
#add-new-services-menu cr-menu-item .icon.start {
  /* Apply the rgb(90, 90, 90) mask. */
  -webkit-filter: contrast(0) brightness(0.7143);
}

cr-menu-item[command='#install-new-extension'] .icon.start {
  background-image: -webkit-image-set(
      url(../images/files/ui/store.png) 1x,
      url(../images/files/ui/2x/store.png) 2x);
}

.tree-row [menu-button-icon='add-new-services'] {
  background-image: -webkit-image-set(
      url(../images/volumes/add.png) 1x,
      url(../images/volumes/2x/add.png) 2x);
}
